package com.project.mapper;

import com.github.pagehelper.PageInfo;
import com.project.bean.PeopleBean;
import org.apache.ibatis.annotations.*;

import java.time.LocalDate;
import java.util.List;
@Mapper
public interface IPeopleMapper {
    @Insert("insert into t_man(m_name,m_birthday)values(#{name},#{birth})")
    void add(PeopleBean people);
    @Delete("delete from t_man where pk_manID= #{id}")
    void delete(int id);
    @Update("update t_man set m_birthday = #{birth} where pk_manID = #{id}")
    void update(@Param("id") int id,@Param("birth") LocalDate birth);
    @Select("select * from t_man")
    @ResultMap("peopleMap")
    List<PeopleBean> searchAll();


    List<PeopleBean> findByItem(String name, LocalDate start, LocalDate end);
}
